//
//  WatchContentViewController.m
//  A段
//
//  Created by 潘君峰 on 15/4/13.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "WatchContentViewController.h"



@interface WatchContentViewController () <UIWebViewDelegate>
@property (nonatomic, retain)UIWebView *webView;
@end

@implementation WatchContentViewController
- (void)dealloc
{
    [_webString release];
    [_webView release];

    [super dealloc];
}
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        
    }
    return self;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self webRequest];
}


- (void)webRequest
{
    UIWebView *web = [[[UIWebView alloc] initWithFrame:CGRectMake(0, -44, self.view.frame.size.width, self.view.frame.size.height + 180)]autorelease];
    //去掉弹簧功能
    web.scrollView.bounces = NO;
    [self.view addSubview:web];
    
    //1.创建网络请求
    NSString *urlstr = self.webString;
    NSURL *url=[NSURL URLWithString:urlstr];
    NSURLRequest *request=[NSURLRequest requestWithURL:url];
    //自适应尺寸
    self.webView.scalesPageToFit=YES;
    
    //加载网络请求
    [web loadRequest:request];
}
























@end
